<template>
	<view class="content">
	  <view class="tishi" v-for="(items,index) in dataTree" :key="index" @click="goSubmit(items)">
	<!--    <u-icon name="map" color="#04BDA5" size="13" bold="true">
	    </u-icon> -->
		<uni-icons type="location" color="#04BDA5"  size="30" style="margin-left: 20rpx;"></uni-icons>

	    <text class="txt">
	      {{items.name || ''}}
	    </text>
	  </view>
	</view>
</template>

<script setup>
	import {
		onMounted,
		reactive,
		ref,
		watchEffect
	} from 'vue';
	import {
		vehicleLoanOrderApi
	} from '@/api/business/qr/vehicle-loan-order-api';

	let dataTree = ref([])
	async function getMapDataFun(paramValue) {
		let res = await vehicleLoanOrderApi.getMapDataApi(paramValue)
		dataTree.value = res.data.map(it => {
			return {
				name: it.provinceName,
				value: it.provinceCode,
			}
		})
	}
	onMounted(() => {
		getMapDataFun({
			type: "1", // 1: 省份，2：市，3：区县 4：街道
			provinceCode: "", // 省份代码
			cityCode: "", // 市代码
			areaCode: "", // 区县代码
		})
	})
	function goSubmit(da) {
		uni.setStorageSync('shenfid',da.value)
		uni.setStorageSync('shengData',JSON.stringify(da))
		uni.navigateTo({
			url:`/pages/addres/shi`
		})
	}
</script>

<style>
	.content {
	  /* width: 100%; */
	  height: 100%;
	  background: linear-gradient(215deg, #D9FCF8 0%, #FFFFFF 10%);
	  box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
	  border-radius: 50rpx 50rpx 0rpx 0rpx;
	  border: 2px solid #FFFFFF;
	  /* margin-top: 26rpx; */
	}
	
	
	.tishi {
	  position: relative;
	  /*width: 650rpx;*/
	  height: 80rpx;
	  text-align: left;
	  background-color: rgba(4, 189, 165, 0.1);
	  border-radius: 30rpx;
	  margin: 42rpx 50rpx 0 50rpx;
	  /*padding-left: 20rpx;*/
	  display: flex;
	  align-items: center;
	  justify-items: center;
	}
	
	.tishi .u-icon {
	  margin-left: 30rpx !important;
	}
	
	.tishi .txt {
	  font-family: PingFang SC;
	  font-weight: 400;
	  font-size: 24rpx;
	  color: #04BDA5;
	  margin-left: 4rpx;
	}
	
	/* .tishi:hover {
		background-color: rgba(6, 119, 107, 0.1);
	} */
	.tishi:hover {
	  background-color: #E8F3F2; /* 鼠标悬停时的背景色 */
	}
	   
</style>